package com.example.mybatisdebugtest.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
public class IndexController {
    //登录-注册-退出登录-修改密码页面
    @RequestMapping("/login")
    public String login(){
        return "login";
    }

    @RequestMapping("/logout")
    public String logout(HttpSession session){
        session.invalidate();
        return "login";
    }
    @RequestMapping("/register")
    public String register(){
        return "register";
    }
    @RequestMapping("/recover-password")
    public String recoverPassword(){
        return "recover-password";
    }

    //主页
    @RequestMapping("/index")
    public String index(){
        return "index";
    }

    //表单操作页面{分页查询+修改+删除}
    @RequestMapping("/data-table")
    public String dataTable(){
        return "data-table";
    }

    //个人信息(暂时不用)
}
